import java.util.Scanner;
public class test417 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter two characters: ");
        String input = scanner.next();
        if (input.length() != 2) {
            System.out.println("Invalid input");
            scanner.close();
            return;
        }
        char majorChar = Character.toUpperCase(input.charAt(0));
        char gradeChar = input.charAt(1);
        String major = "";
        String grade = "";
        switch (majorChar) {
            case 'M':
                major = "Mathematics";
                break;
            case 'C':
                major = "Computer Science";
                break;
            case 'I':
                major = "Information Technology";
                break;
            default:
                System.out.println("Invalid input");
                scanner.close();
                return;
        }
        switch (gradeChar) {
            case '1':
                grade = "Freshman";
                break;
            case '2':
                grade = "Sophomore";
                break;
            case '3':
                grade = "Junior";
                break;
            case '4':
                grade = "Senior";
                break;
            default:
                System.out.println("Invalid input");
                scanner.close();
                return;
        }
        System.out.println(major + " " + grade);
        scanner.close();
    }
}

